package com.wyvoid.core.tag;

public class TGCalendarDay {
    private String styleId = null;
    private String styleClass = null;
    private StringBuffer lines = new StringBuffer() ;
    private int day;
    
    public String getLines() {
        return lines.toString();
    }
    public void addLine(String line) {
        if (this.lines.length() != 0){
            this.lines.append("<br/>"); 
        }
        this.lines.append(line);
    }

    public void setLines(String lines) {
        this.lines = new StringBuffer(lines);
    }

    public String getStyleClass() {
        return styleClass;
    }
    public void setStyleClass(String styleClass) {
        this.styleClass = styleClass;
    }
    public String getStyleId() {
        return styleId;
    }
    public void setStyleId(String styleId) {
        this.styleId = styleId;
    }

    public int getDay() {
        return day;
    }

    public void setDay(int day) {
        this.day = day;
    }

    public String toString(){
        StringBuffer sb = new StringBuffer();
        sb.append("<td width=\"14%\"");
        if (styleClass != null){
            sb.append(" class=\"" + styleClass + "\"");
        }
        if (styleId != null){
            sb.append(" id=\"" + styleId + "\"");
        }
        sb.append(">" + lines.toString() + "</td>");
        return sb.toString();
    }
}
